package com.syswin.lhztest.runner;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;

/**
 * Created by GuoMengnan on 2018/9/27.
 */

@Configuration
public class PsServerRunner implements ApplicationRunner {

	private static final Logger logger = LoggerFactory.getLogger(PsServerRunner.class);


	/**
	 * Callback used to run the bean.
	 *
	 * @param args incoming application arguments
	 * @throws Exception on error
	 */
	@Override
	public void run(ApplicationArguments args) {

		logger.info("psserver--- start" + args.getNonOptionArgs());

		String[] sourceArgs = args.getSourceArgs();
		for (int i = 0; i < sourceArgs.length; i++) {
			logger.info("sourceArgs" + sourceArgs[i]);
		}
		logger.info("psserver--- start" + args.getOptionNames());
	}
}
